// Copyright © 2018 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

namespace CefSharp.Wpf
{
    /// <summary>
    /// Initialization settings. Many of these and other settings can also configured
    /// using command-line switches.
    /// </summary>
    public class CefSettings : AbstractCefSettings
    {
        /// <summary>
        /// Intialize with default values
        /// </summary>
        public CefSettings() : base()
        {
            WindowlessRenderingEnabled = true;

            //Disable multithreaded, compositor scrolling of web content
            //With OSR rendering it's fairly common for this to improve scrolling performace
            //https://peter.sh/experiments/chromium-command-line-switches/#disable-threaded-scrolling
            //CefCommandLineArgs.Add("disable-threaded-scrolling");

            //CefCommandLineArgs.Add("disable-gpu-compositing","");
            //CefCommandLineArgs.Add("disable-gpu", "");
            CefCommandLineArgs.Add("enable-gpu-compositing");
            // settings.CefCommandLineArgs.Add("disable-gpu-compositing", "1");
            CefCommandLineArgs.Add("enable-begin-frame-scheduling", "1");
            CefCommandLineArgs.Add("enable-npapi", "1");
            CefCommandLineArgs.Add("enable-system-flash", "1");
            CefCommandLineArgs.Add("enable-media-stream", "1");
            CefCommandLineArgs.Add("ppapi-flash-version", "32.0.0.344");
           // CefCommandLineArgs.Add("ppapi-flash-path", @"C:\Bin\Thunder Network\Thunder\Program\resources\bin\TBC\PepperFlash\pepflashplayer.dll");
        }
    }
}
